package sd.czw.com.mmgapp;

import sd.czw.com.mmgapp.utils.MD5Utils;
import sd.czw.com.mmgapp.utils.SetDataUtil;

public class Contants {

    public static final String APP_ID = "wx769ccc7d245b8ee4";

    //程序密钥
    public static final String APPKEY = "miemiegou.com_2015";
    //时间戳格式
    public static final String DATEFORMAT = "yyyy/MM/dd HH:mm:ss";
    //共有接口
    public static final String BASE_URL = "http://miemiegou.com/";

    /**
     * 首页接口
     */
    //首页接口
    public static final String HOME_URL = BASE_URL + "wap/app_index.php";
    //首页商品列表
    public static final String HOME_GOODSLIST = BASE_URL+"wap/app_index_getgoods.php";
    //商品详情
    public static final String GOODS_DETATIL = BASE_URL+"wap/app_goods.php";

    /**
     * 购物车
     */
    //加入购物车
    public static final String ADD_CART = BASE_URL+"wap/app_flow.php";


    /**
     * 分类接口
     */
    //分类标题列表
    public static final String FL_LIST = BASE_URL+"wap/app_category.php";
    //分类商品列表
    public static final String FL_GOODS = BASE_URL+"wap/app_category.php";

    /**
     * 登录  注册
     */
    //注册用户 发送短信接口 (登录、验证修改密码、找回密码)
    public static final String NMLOGIN = BASE_URL+"wap/app_login.php";

    //用户注册界面的   咩咩购协议链接
    public static final String AGREEMENT_URL = BASE_URL +"wap/article.php?cat_id=-1";

    //分类接口
    public static final String CATEGORY_URL = BASE_URL + "wap/app_category.php";
    //推广
    public static final String TG_URL =BASE_URL+"wap/app_user.php";



    //我的优惠券
    public static final String YHJ = BASE_URL+"wap/app_user.php";

    public static final String Time = SetDataUtil.getTime(System.currentTimeMillis());
    //签名sign，算法为：【当前时间戳*4】+【密钥】，以上两个参数以字符串形式拼接，然后做MD5运算
    public static final String Sign = MD5Utils.stringToMD5(String.valueOf(Long.parseLong(Time) * 4) + Contants.APPKEY);


//    public static final String TIME = "time";
//    public static final String SIGN = "sign";
//    public static final String START = "start";
//    public static final String LIMTI = "limit";
//    public static final String USERNAME = "username";
//    public static final String PASSWORD = "password";
//    public static final String TOKEN = "token";
    public static final String ACT = "act";
//    public static final String ORDERID = "order_id";
//
    protected String time;
    protected String sign;
    protected String username;
    protected String password;
    protected String token;
    protected String act;
    private String order_id;


    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getAct() {
        return act;
    }

    public void setAct(String act) {
        this.act = act;
    }

    public String getOrder_id() {
        return order_id;
    }

    public void setOrder_id(String order_id) {
        this.order_id = order_id;
    }
}
